import { boot } from 'quasar/wrappers'
import { GlobalCfgDef } from '@njt/foundation/defs/comm.d'
import fxInit from '@njt/foundation'
import wmInit from '@njt/wms'
import bfsInit from '@njt/bfs'
import mhlbcInit from 'src'

export default boot(async ({ app, router }) => {
  const globalCfg: GlobalCfgDef = {
    enableGitemCheck: true,
    // 使用严格密码
    useStrictPassword: false,
    mfFieldOptions: {},
    fieldOptions: {
      // userDef1: {
      //   isShown: true,
      //   label: '贴标状态'
      // },
    },
    lineFieldOptions: {
      userDef1: {
        isShown: true,
        label: '贴标状态'
      },
      userDef2: {
        isShown: true
      },
      userDef3: {
        isShown: true
      },
      userDef4: {
        isShown: true
      },
      userDef5: {
        isShown: true
      },
      userDef6: {
        isShown: true
      },
      userDef7: {
        isShown: true
      },
      userDef8: {
        isShown: true
      },
      userDef9: {
        isShown: true
      },
      userDef10: {
        isShown: true
      },
    },
    enableRoleCompanyRelationDataRight: false,
    enableRoleCustomerRelationDataRight: false,
    enableRoleVendorRelationDataRight: false,
    enableRoleStorerRelationDataRight: true,
    enableRoleWhRelationDataRight: true,
    enableRoleCbRelationDataRight: false,
    enableAccessoryPackDownload: true,
    enableRoleStorerOrgRelationDataRight: false
  }
  await fxInit(app, router, globalCfg, import.meta.env)
  await mhlbcInit()
  wmInit(app)
  bfsInit(app)
})
